#ifndef __OC_GLTFLoader_H__
#define __OC_GLTFLoader_H__

#include "Mesh.h"

namespace tinygltf
{
	class Model;
	class Node;
}

namespace OCPP
{
	class _openGLExport GLTFLoader
	{
	public:
		GLTFLoader();
		~GLTFLoader();

		void load(String fileName);

		MeshList& getMeshes();
		void setInstanceMatrix(Matrix4List instanceMatrixs)
		{
			mInstanceMatrixs = instanceMatrixs;
		}
	protected:
		TextureList getMaterials(tinygltf::Model& model, int matInd);
		void traverse(tinygltf::Model& model, int nodeInd, Matrix4 parentMatrix);
		TextureMap mLoadedTextures;
		MeshList mMeshList;
		String mFilePath;
		Matrix4List mInstanceMatrixs;
	};
}

#endif // !__OC_WINDOW_H__
